<template>
  <div>
    <el-row>
      <el-col :span="24">
        <el-form :inline="true" class="demo-form-inline">
          <el-form-item>
            <el-input
              v-model="input"
              style="width: 200px"
              placeholder="请输入内容"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="tracking">查询</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="addition">新增</el-button>
          </el-form-item>
        </el-form>
      </el-col>
      <el-col :span="24">
        <div>
          <el-table :data="tableData" border style="width: 100%">
            <el-table-column prop="date" label="ID" width=""> </el-table-column>
            <el-table-column prop="name" label="留言" width="">
            </el-table-column>
            <el-table-column prop="date1" label="手机号" width="">
            </el-table-column>
            <el-table-column prop="address" label="用户姓名"> </el-table-column>
            <el-table-column prop="address" label="用户公司"> </el-table-column>
            <el-table-column prop="address1" label="留言时间">
            </el-table-column>
            <el-table-column label="操作" width="180" align="center">
              <template #default="scope">
                <el-button
                  size="mini"
                  @click="handleEdit(scope.$index, scope.row)"
                  >完成</el-button
                >
                <el-button
                  size="mini"
                  type="danger"
                  @click="handleDelete(scope.$index, scope.row)"
                  >删除</el-button
                >
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { defineComponent, ref } from "vue";
export default defineComponent({
  setup() {
    return {
      input: ref(""),
      tableData: [
        {
          date: "11",
          name: "xxxxxx",
          date1: "123123131",
          address: "张三",
          address1: "2021/5/10",
        },
      ],
    };
  },
  methods: {
    tracking() {
      console.log(this.input);
    },
    addition() {
      console.log("新增");
    },
  },
});
</script>

<style scoped>
.addccc {
  margin-bottom: 20px;
}
</style>